package zd.cornermemory.ui;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.RelativeLayout;

import zd.cornermemory.R;

public class CodeCornerActivity extends BaseActivity implements View.OnClickListener{
    private RelativeLayout layout_1;
    private RelativeLayout layout_2;
    private RelativeLayout layout_3;
    private RelativeLayout layout_4;
    private RelativeLayout layout_5;
    private RelativeLayout layout_6;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.acitivity_code_corner);
        layout_1 = findViewById(R.id.layout_1);
        layout_2 = findViewById(R.id.layout_2);
        layout_3 = findViewById(R.id.layout_3);
        layout_4 = findViewById(R.id.layout_4);
        layout_5 = findViewById(R.id.layout_5);
        layout_6 = findViewById(R.id.layout_6);
        setBackImage();
        layout_1.setOnClickListener(this);
        layout_2.setOnClickListener(this);
        layout_3.setOnClickListener(this);
        layout_4.setOnClickListener(this);
        layout_5.setOnClickListener(this);
        layout_6.setOnClickListener(this);

    }


    @Override
    public void onClick(View view) {
        Intent intent = null;
        switch (view.getId()) {
            case R.id.layout_1:
                intent = new Intent(mContext, CornerCodeFx1Activity.class);
                startActivity(intent);
                break;
            case R.id.layout_2:
                intent = new Intent(mContext, CornerCodeCs1Activity.class);
                startActivity(intent);
                break;
            case R.id.layout_3:
                intent = new Intent(mContext, CornerCodeFx2Activity.class);
                startActivity(intent);
                break;
            case R.id.layout_4:
                intent = new Intent(mContext, CornerCodeCs2Activity.class);
                startActivity(intent);
                break;
            case R.id.layout_5:
                intent = new Intent(mContext, CornerCodeFx3Activity.class);
                startActivity(intent);
                break;
            case R.id.layout_6:
                intent = new Intent(mContext, CornerCodeCs3Activity.class);
                startActivity(intent);
                break;
        }
    }
}
